home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
e40ds3.arc
/
EXAMPLE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-03-10
|
676b
|
26 lines
Program Example;
{ This a very simple example of an E! API program }
{ changing the current text line for a new one }
USES API;
TYPE sptr = ^string; { for type casting }
VAR s:pointer; { to receive address returned by Request_E_Address }
BEGIN
(* E!PRESENT (environment variable) should normally be tested *)
s:=Request_E_Address(EDITBUFF_REQUEST);
{ Retrieve Editbuffer address }
sptr(s)^:='Here I am. I replaced the original text line!';
{ Modify it }
Request_E_Service(STORE_SERVICE);
{ Store it }
Request_E_Service(DISPLINE_SERVICE);
{ Display it }
Request_E_Service(CHANGE_SERVICE);
{ Notify the change }
END.